<div ng-if="editMode" class="alert alert-info">Currently in edit mode. Save or undo your changes when you are done.</div>
<div class="dashboard-title">
  <h1>{{model.title}}</h1>
  <span class="dropdown edit-mode" uib-dropdown>
    <button class="btn-wo-border btn btn-default btn-sm dropdown-toggle" uib-dropdown-toggle>
      <span class="sr-only">options for dashboard</span>
      <i class="glyphicon glyphicon-option-vertical" aria-hidden="true"></i>
    </button>
    <ul class="dropdown-menu">
      <li ng-if="editMode" ng-click="addWidgetDialog()">
        <button class="btn-wo-border">Add widget</button>
      </li>
      <li ng-if="editMode" ng-click="editDashboardDialog()">
        <button class="btn-wo-border">Dashboard settings</button>
      </li>
      <li ng-if="options.editable && !editMode" ng-click="toggleEditMode()">
        <button class="btn-wo-border">Edit dashboard</button>
      </li>
      <li ng-if="options.editable && editMode" ng-click="toggleEditMode()">
        <button class="btn-wo-border">Save changes</button>
      </li>
      <li ng-if="options.editable && editMode" ng-click="collapseAll(true)">
        <button class="btn-wo-border">Collapse All</button>
      </li>
      <li ng-if="options.editable && editMode" ng-click="collapseAll(false)">
        <button class="btn-wo-border">Expand All</button>
      </li>
      <li ng-if="editMode" ng-click="cancelEditMode()">
        <button class="btn-wo-border">Undo changes</button>
      </li>
    </ul>
  </span>
</div>
